<?php 
		Class IndexAction extends Action{
		Public function index(){
		//	$topCate=M('cate')->where(array('pid'=>0))->order('sort')->select();
		//	import('Class.Category',APP_PATH);
		//	$cate=M('cate')->order('sort')->select();
		//	$db=M('blog');
		//	$field=array('id','title','time');
	//	foreach($topCate as $k=>$v){
 //   $cids=Category::getChildsId($cate,$v['id']);
//$cids[]=$v['id'];
//$where=array('id'=>array('IN',$cids));
//$topCate[$k]['blog']=$db->field($field)->where($where)->select();
	//	}
		 //   $this->cate=$topCate;
		//	p($date);
			
		if(!$list=S('index_list')){
				$this->cate=M('cate')->select();
				S('index_list',$list,10);
		}
				
				$this->cate=$list;
				$this->display();
		}
		}
?>